package com.baizhiedu.mybatis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * ClassName: UserServiceImpl
 * Description:
 * Date: 2022/12/04 PM 7:13:21
 * <p>
 * project: spring5
 * package: com.baizhiedu.mybatis
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    /**
     * 注册
     *
     * @param user {@link User}
     */
    @Override
    public void register(User user) {
        userDao.save(user);
    }
}
